home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / Apache / include / php / ext / standard / flock_compat.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-23  |  1.7 KB  |  50 lines

  1. /*
  2.    +----------------------------------------------------------------------+
  3.    | PHP version 4.0                                                      |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group                   |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 2.02 of the PHP license,      |
  8.    | that is bundled with this package in the file LICENSE, and is        |
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.php.net/license/2_02.txt.                                 |
  11.    | If you did not receive a copy of the PHP license and are unable to   |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@php.net so we can mail you a copy immediately.               |
  14.    +----------------------------------------------------------------------+
  15.    | Authors: Sascha Schumann <sascha@schumann.cx>                        |
  16.    +----------------------------------------------------------------------+
  17. */
  18.  
  19. /* $Id: flock_compat.h,v 1.9 2000/07/24 01:39:49 david Exp $ */
  20.  
  21. #ifndef FLOCK_COMPAT_H
  22. #define FLOCK_COMPAT_H
  23.  
  24. #ifndef HAVE_FLOCK
  25. #    define LOCK_SH 1
  26. #    define LOCK_EX 2
  27. #    define LOCK_NB 4
  28. #    define LOCK_UN 8
  29. int flock(int fd, int operation);
  30. #endif
  31.  
  32. #ifdef PHP_WIN32
  33. #define EWOULDBLOCK WSAEWOULDBLOCK
  34. #    define fsync _commit
  35. #    define ftruncate(a,b) chsize(a,b)
  36. #endif /* defined(PHP_WIN32) */
  37.  
  38. #if !HAVE_INET_ATON
  39. #if HAVE_NETINET_IN_H
  40. #include <netinet/in.h>
  41. #endif
  42. #if HAVE_ARPA_INET_H
  43. #include <arpa/inet.h>
  44. #endif
  45.  
  46. extern int inet_aton(const char *, struct in_addr *);
  47. #endif
  48.  
  49. #endif    /* FLOCK_COMPAT_H */
  50.